Added an Upgrade All button for CSW packages.
---- Changes since 1.440 ----
Added a Module Config option to not use any update system, even if YUM or APT are installed.
+Added the function package_files for other modules to call, when only a list of files in some package is needed.
return $i;
}
+# package_files(package)
+# Returns a list of all files in some package
+sub package_files
+{
+local ($pkg) = @_;
+local $qn = quotemeta($pkg);
+local @rv;
+&open_execute_command(RPM, "dpkg --listfiles $qn", 1, 1);
+while(<RPM>) {
+ s/\r|\n//g;
+ push(@rv, $_);
+ }
+close(RPM);
+return @rv;
+}
+
# installed_file(file)
# Given a filename, fills %file with details of the given file and returns 1.
# If the file is not known to the package system, returns 0
return $i;
}
+# package_files(package)
+# Returns a list of all files in some package
+sub package_files
+{
+local ($pkg) = @_;
+local $qn = quotemeta($pkg);
+local @rv;
+&open_execute_command(RPM, "pkg_info -L $qn", 1, 1);
+while(<RPM>) {
+ s/\r|\n//g;
+ if (/^\//) {
+ push(@rv, $_);
+ }
+ }
+close(RPM);
+return @rv;
+}
+
# installed_file(file)
# Given a filename, fills %file with details of the given file and returns 1.
# If the file is not known to the package system, returns 0
return $i;
}
+# package_files(package, [version])
+# Returns a list of all files in some package
+sub package_files
+{
+local ($pkg, $version) = @_;
+local $qn = quotemeta($version ? "$pkg-$version" : $pkg);
+local @rv;
+&open_execute_command(RPM, "rpm -q -l $qn", 1, 1);
+while(<RPM>) {
+ s/\r|\n//g;
+ push(@rv, $_);
+ }
+close(RPM);
+return @rv;
+}
+
# installed_file(file)
# Given a filename, fills %file with details of the given file and returns 1.
# If the file is not known to the package system, returns 0
return $i;
}
+# package_files(package)
+# Returns a list of all files in some package
+sub package_files
+{
+local ($pkg) = @_;
+local @rv;
+&open_readfile(PKG, "$package_dir/$_[0]");
+while(<PKG>) {
+ last if (/^FILE LIST:/i);
+ }
+while(my $file = <PKG>) {
+ $file =~ s/\r|\n//g;
+ next if ($file eq "./");
+ $file = '/'.$file;
+ push(@rv, $file);
+ }
+close(PKG);
+return @rv;
+}
+
# installed_file(file)
# Given a filename, fills %file with details of the given file and returns 1.
# If the file is not known to the package system, returns 0