Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
125d4ada
Kaydet (Commit)
125d4ada
authored
Ara 28, 2009
tarafından
Vladimir Glazunov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i107041#
üst
2bc1a6dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
build.pl
solenv/bin/build.pl
+0
-0
SourceConfig.pm
solenv/bin/modules/SourceConfig.pm
+39
-9
No files found.
solenv/bin/build.pl
Dosyayı görüntüle @
125d4ada
This diff is collapsed.
Click to expand it.
solenv/bin/modules/SourceConfig.pm
Dosyayı görüntüle @
125d4ada
...
@@ -57,12 +57,16 @@ sub new {
...
@@ -57,12 +57,16 @@ sub new {
my
$proto
=
shift
;
my
$proto
=
shift
;
my
$class
=
ref
(
$proto
)
||
$proto
;
my
$class
=
ref
(
$proto
)
||
$proto
;
my
$source_root
=
shift
;
my
$source_root
=
shift
;
my
$self
=
{};
$self
->
{
USER_SOURCE_ROOT
}
=
undef
;
if
(
defined
$source_root
)
{
if
(
defined
$source_root
)
{
$self
->
{
USER_SOURCE_ROOT
}
=
$source_root
;
$source_root
=~
s/\\|\/$//
;
$source_root
=~
s/\\|\/$//
;
$source_root
.=
'/..'
;
}
else
{
}
else
{
$source_root
=
$ENV
{
SO
LARSRC
};
$source_root
=
$ENV
{
SO
URCE_ROOT_DIR
};
};
};
my
$self
=
{}
;
$source_root
=
Cwd::
realpath
(
$source_root
)
;
$self
->
{
DEBUG
}
=
0
;
$self
->
{
DEBUG
}
=
0
;
$self
->
{
SOURCE_ROOT
}
=
$source_root
;
$self
->
{
SOURCE_ROOT
}
=
$source_root
;
$self
->
{
REPOSITORIES
}
=
{};
$self
->
{
REPOSITORIES
}
=
{};
...
@@ -72,7 +76,7 @@ sub new {
...
@@ -72,7 +76,7 @@ sub new {
$self
->
{
MODULE_REPOSITORY
}
=
{};
$self
->
{
MODULE_REPOSITORY
}
=
{};
$self
->
{
REAL_MODULES
}
=
{};
$self
->
{
REAL_MODULES
}
=
{};
$self
->
{
SOURCE_CONFIG_FILE
}
=
get_config_file
(
$source_root
);
$self
->
{
SOURCE_CONFIG_FILE
}
=
get_config_file
(
$source_root
);
$self
->
{
SOURCE_CONFIG_DEFAULT
}
=
Cwd::
realpath
(
$source_root
)
.
'/'
.
SOURCE_CONFIG_FILE_NAME
;
$self
->
{
SOURCE_CONFIG_DEFAULT
}
=
$source_root
.
'/'
.
SOURCE_CONFIG_FILE_NAME
;
read_config_file
(
$self
);
read_config_file
(
$self
);
bless
(
$self
,
$class
);
bless
(
$self
,
$class
);
return
$self
;
return
$self
;
...
@@ -206,18 +210,39 @@ sub get_module_paths {
...
@@ -206,18 +210,39 @@ sub get_module_paths {
sub
get_config_file
{
sub
get_config_file
{
my
$source_root
=
shift
;
my
$source_root
=
shift
;
foreach
(
$source_root
,
$source_root
.
'/..'
)
{
my
$possible_path
=
$source_root
.
'/'
.
SOURCE_CONFIG_FILE_NAME
;
if
(
-
f
$_
.
'/'
.
SOURCE_CONFIG_FILE_NAME
)
{
return
$possible_path
if
(
-
f
$possible_path
);
return
Cwd::
realpath
(
$_
)
.
'/'
.
SOURCE_CONFIG_FILE_NAME
;
return
''
;
};
sub
get_hg_root
{
my
$hg_root
;
if
(
open
(
COMMAND
,
"hg root 2>&1 |"
))
{
foreach
(
<
COMMAND
>
)
{
next
if
(
/^Not trusting file/
);
chomp
;
$hg_root
=
$_
;
last
;
};
close
COMMAND
;
chomp
$hg_root
;
if
(
$hg_root
!~
/There is no Mercurial repository here/
)
{
return
$hg_root
;
};
};
};
};
return
''
;
croak
(
'Cannot open find source_config and/or determine hg root directory for '
.
cwd
())
;
};
};
sub
read_config_file
{
sub
read_config_file
{
my
$self
=
shift
;
my
$self
=
shift
;
if
(
!
$self
->
{
SOURCE_CONFIG_FILE
})
{
if
(
!
$self
->
{
SOURCE_CONFIG_FILE
})
{
$
{
$self
->
{
REPOSITORIES
}}{
File::Basename::
basename
(
$self
->
{
SOURCE_ROOT
})}
=
$self
->
{
SOURCE_ROOT
};
my
$repository_root
;
if
(
defined
$self
->
{
USER_SOURCE_ROOT
})
{
$repository_root
=
$self
->
{
USER_SOURCE_ROOT
};
}
else
{
$repository_root
=
get_hg_root
();
};
$
{
$self
->
{
REPOSITORIES
}}{
File::Basename::
basename
(
$repository_root
)}
=
$repository_root
;
return
;
return
;
};
};
my
$repository_section
=
0
;
my
$repository_section
=
0
;
...
@@ -243,7 +268,7 @@ sub read_config_file {
...
@@ -243,7 +268,7 @@ sub read_config_file {
next
if
(
!
$repository_section
&&
!
$module_section
);
next
if
(
!
$repository_section
&&
!
$module_section
);
if
(
/\s*(\S+)=active\s*(\s+#)*/
)
{
if
(
/\s*(\S+)=active\s*(\s+#)*/
)
{
if
(
$repository_section
)
{
if
(
$repository_section
)
{
$
{
$self
->
{
REPOSITORIES
}}{
$1
}
=
File::Basename::
dirname
(
$self
->
{
SOURCE_ROOT
})
.
"/$1"
;
$
{
$self
->
{
REPOSITORIES
}}{
$1
}
=
$self
->
{
SOURCE_ROOT
}
.
"/$1"
;
next
;
next
;
}
}
if
(
$module_section
)
{
if
(
$module_section
)
{
...
@@ -254,6 +279,11 @@ sub read_config_file {
...
@@ -254,6 +279,11 @@ sub read_config_file {
croak
(
"Line $line in "
.
$self
->
{
SOURCE_CONFIG_FILE
}
.
'violates format. Please make your checks!!'
);
croak
(
"Line $line in "
.
$self
->
{
SOURCE_CONFIG_FILE
}
.
'violates format. Please make your checks!!'
);
};
};
close
SOURCE_CONFIG_FILE
;
close
SOURCE_CONFIG_FILE
;
if
(
!
scalar
keys
%
{
$self
->
{
REPOSITORIES
}})
{
# Fallback - default repository is the directory where is our module...
my
$hg_root
=
get_hg_root
();
$
{
$self
->
{
REPOSITORIES
}}{
File::Basename::
basename
(
$hg_root
)}
=
$hg_root
;
};
}
else
{
}
else
{
croak
(
'Cannot open '
.
$self
->
{
SOURCE_CONFIG_FILE
}
.
'for reading'
);
croak
(
'Cannot open '
.
$self
->
{
SOURCE_CONFIG_FILE
}
.
'for reading'
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment