Changeset 2360 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Distribution.pm
- Timestamp:
- Feb 25, 2019, 12:20:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r2350 r2360 257 257 # Found one possibility. 258 258 # Get all distros concerned by that file 259 my $tmp =pb_get_content("$r");259 my $tmp = pb_get_content("$r"); 260 260 my $ptr = $distro_similar->{$d}; 261 261 pb_log(2,"amb: ".Dumper($ptr)."\n"); … … 277 277 } 278 278 } 279 # 280 # Now look at the os-release file to see if we have a std distribution description 281 # 282 $r = "/usr/lib/os-release"; 283 if (-r $r) { 284 my $tmp = pb_get_content("$r"); 285 ($release) = $tmp =~ m/.*\nVERSION_ID=[\"\']*([0-9a-z\._-]+)[\"\']*\n/m; 286 ($distro) = $tmp =~ m/.*\nID=[\"\']*([0-9A-z\._-]+)[\"\']*\n/m; 287 # Remove the leap suffix if present (OpenSUSE) 288 $distro =~ s/-leap//; 289 $found = 1 if ((defined $release) && (defined $distro)); 290 } 279 291 if ($found == 0) { 280 292 print STDERR "Unable to find a version in ".join(' ',keys %$ambiguous_rel_files)." (ambiguous)\n"; 281 293 print STDERR "Please report to the maintainer bruno_at_project-builder.org\n"; 282 return("unknown","unknown");294 confess "Please report to the maintainer bruno_at_project-builder.org\n"; 283 295 } else { 284 296 return($distro,$release);
Note:
See TracChangeset
for help on using the changeset viewer.