Skip to content

Commit

Permalink
Merge pull request #198 from jrmarino/txz-to-pkg-extension
Browse files Browse the repository at this point in the history
Txz to pkg extension
  • Loading branch information
jrmarino committed Jul 23, 2021
2 parents 12cffb4 + eedd497 commit 2e4436d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/definitions.ads
Expand Up @@ -6,7 +6,7 @@ package Definitions is
pragma Pure;

synth_version_major : constant String := "2";
synth_version_minor : constant String := "11";
synth_version_minor : constant String := "12";
copyright_years : constant String := "2015-2021";
host_localbase : constant String := "/usr/local";
host_make : constant String := "/usr/bin/make";
Expand Down
6 changes: 3 additions & 3 deletions src/portscan-packages.adb
Expand Up @@ -24,7 +24,7 @@ package body PortScan.Packages is
AD.Start_Search (Search => pkg_search,
Directory => repository,
Filter => (AD.Ordinary_File => True, others => False),
Pattern => "*.txz");
Pattern => "*.pkg");
while AD.More_Entries (Search => pkg_search) loop
AD.Get_Next_Entry (Search => pkg_search,
Directory_Entry => dirent);
Expand Down Expand Up @@ -367,7 +367,7 @@ package body PortScan.Packages is
AD.Start_Search (Search => pkg_search,
Directory => repository,
Filter => (AD.Ordinary_File => True, others => False),
Pattern => "*.txz");
Pattern => "*.pkg");
while AD.More_Entries (Search => pkg_search) loop
AD.Get_Next_Entry (Search => pkg_search,
Directory_Entry => dirent);
Expand Down Expand Up @@ -581,7 +581,7 @@ package body PortScan.Packages is
declare
line : constant String := JT.USS (topline);
origin : constant String := JT.part_1 (line, ":");
deppkg : constant String := JT.part_2 (line, ":") & ".txz";
deppkg : constant String := JT.part_2 (line, ":") & ".pkg";
origintxt : JT.Text := JT.SUS (origin);

target_id : port_index;
Expand Down
6 changes: 3 additions & 3 deletions src/portscan-packages.ads
Expand Up @@ -23,7 +23,7 @@ package PortScan.Packages is
procedure remove_queue_packages (repository : String);

-- This procedure empties the given repository without discrimination.
-- (Well, it's limited to "*.txz" matches, but normally that's everything)
-- (Well, it's limited to "*.pkg" matches, but normally that's everything)
-- (currently unused)
procedure wipe_out_repository (repository : String);

Expand Down Expand Up @@ -99,7 +99,7 @@ private
-- used by passed_abi_check()
procedure establish_package_architecture;

-- Scan directory that contains the packages (*.txz) and stores the
-- Scan directory that contains the packages (*.pkg) and stores the
-- file names in the container. Returns False if no packages are found.
function scan_repository (repository : String) return Boolean;

Expand Down Expand Up @@ -139,7 +139,7 @@ private
procedure parallel_preliminary_package_scan (repository : String;
show_progress : Boolean);

-- given a port_id, return the package name (no .txz extension!)
-- given a port_id, return the package name (no .pkg extension!)
function id2pkgname (id : port_id) return String;

-- Turn on option and dependency debug checks programmatically
Expand Down
20 changes: 10 additions & 10 deletions src/portscan-pilot.adb
Expand Up @@ -659,9 +659,9 @@ package body PortScan.Pilot is
is
repo : constant String := JT.USS (PM.configuration.dir_repository);
main : constant String := JT.USS (PM.configuration.dir_packages);
xz_meta : constant String := main & "/meta.txz";
xz_digest : constant String := main & "/digests.txz";
xz_pkgsite : constant String := main & "/packagesite.txz";
packed_meta : constant String := main & "/meta.pkg";
packed_digest : constant String := main & "/digests.pkg";
packed_pkgsite : constant String := main & "/packagesite.pkg";
bs_error : constant String := "Rebuild Repository: Failed to bootstrap builder";
build_res : Boolean;
begin
Expand Down Expand Up @@ -712,14 +712,14 @@ package body PortScan.Pilot is
return False;
end if;

if AD.Exists (xz_meta) then
AD.Delete_File (xz_meta);
if AD.Exists (packed_meta) then
AD.Delete_File (packed_meta);
end if;
if AD.Exists (xz_digest) then
AD.Delete_File (xz_digest);
if AD.Exists (packed_digest) then
AD.Delete_File (packed_digest);
end if;
if AD.Exists (xz_pkgsite) then
AD.Delete_File (xz_pkgsite);
if AD.Exists (packed_pkgsite) then
AD.Delete_File (packed_pkgsite);
end if;
TIO.Put_Line ("Packages validated, rebuilding local repository.");
REP.initialize (testmode => False, num_cores => PortScan.cores_available);
Expand Down Expand Up @@ -1613,7 +1613,7 @@ package body PortScan.Pilot is
end if;
declare
pkgbase : constant String := JT.head (current, "-");
pattern : constant String := pkgbase & "-*.txz";
pattern : constant String := pkgbase & "-*.pkg";
upgrade : JT.Text;

pkg_search : AD.Search_Type;
Expand Down
4 changes: 2 additions & 2 deletions src/replicant-platform.adb
Expand Up @@ -620,9 +620,9 @@ package body Replicant.Platform is
taropt1 : constant String := "*/pkg-static";
taropt2 : constant String := "*/pkg-static */pkgng_admin";
command : constant String := chroot & smount &
" /usr/bin/tar -x --xz -f /packages/Latest/pkg.txz -C / ";
" /usr/bin/tar -x -f /packages/Latest/pkg.pkg -C / ";
install_make : constant String := chroot & smount &
" /usr/pkg/sbin/pkg-static add -A /packages/Latest/bmake.txz";
" /usr/pkg/sbin/pkg-static add -A /packages/Latest/bmake.pkg";
begin
case software_framework is
when ports_collection =>
Expand Down

0 comments on commit 2e4436d

Please sign in to comment.