summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-02-25 14:16:45 +0100
committerRemi Collet <remi@remirepo.net>2019-02-25 14:16:45 +0100
commit46728e63dfa9fada54c3c7b216b5682fd635e463 (patch)
treec985ee995fec62d60f02d21e06c39ca90a3439d8
parentdb0775f2314fef515ec27250675e8a262ec50637 (diff)
report new files in modular
-rwxr-xr-xmkmodular17
1 files changed, 13 insertions, 4 deletions
diff --git a/mkmodular b/mkmodular
index ffd3ff9..08e2cfa 100755
--- a/mkmodular
+++ b/mkmodular
@@ -181,6 +181,7 @@ data:
EOT;
function findPackages($from, $dest, $pat) {
+ global $oldrpms;
$fil = '.';
$rpms = [];
foreach (glob("$from/$pat") as $file) {
@@ -188,10 +189,14 @@ function findPackages($from, $dest, $pat) {
$name = basename($file);
if (!file_exists("$dest/$name")) {
if (link($file, "$dest/$name")) {
- echo $fil;
- if (count($rpms)%64==63) {
- echo "\r";
- $fil = ($fil == '.' ? '-' : '.');
+ if (in_array(basename($file), $oldrpms)) {
+ echo $fil;
+ if (count($rpms)%64==63) {
+ echo "\r";
+ $fil = ($fil == '.' ? '-' : '.');
+ }
+ } else {
+ printf("\r+ %-70s\n", basename($file));
}
}
}
@@ -226,8 +231,12 @@ function genModule($srce, $dest, $pat, $ver, $arch, $deps, $template) {
}
function cleanup($dest) {
+ global $oldrpms;
+
+ $oldrpms = array();
foreach (glob("$dest/*rpm") as $file) {
unlink($file);
+ $oldrpms[] = basename($file);
}
}