our $package_config_base =File::Spec->catdir($base, 'packages');
our $package_state_base = $base;
- our $serials_path = File::Spec->catfile($base, 'serial.txt');
+ our $serials_name = 'serial.txt';
our $Inbox_dir = File::Spec->catdir($base, 'inbox');
our $Scratch_dir = File::Spec->catdir($base, 'scratch');
our $package_config_base = $ZoneConfig{pkgconfdir};
our $package_state_base = $ZoneConfig{pkgstatedir};
- our $serials_path;
- $serials_path= File::Spec->catfile($ZoneConfig{pkgstatedir},
- $ZoneConfig{serials})
- if $ZoneConfig{pkgstatedir} && $ZoneConfig{serials};
+ our $serials_name = $ZoneConfig{serials};
our $Inbox_dir = $ZoneConfig{inboxdir};
our $Scratch_dir = $ZoneConfig{scratchdir};
if ($CheckConfigurationParse) {
our $email_blacklist; our $maintainers_bypkg;
our $Public_Upload_Archive_Inbox; our $Internal_Report_Inbox;
- our $zone_tag; our $Log_Tag; our $serials_path;
+ our $zone_tag; our $Log_Tag; our $serials_name;
our $package_config_base; our $package_state_base;
our $Inbox_dir; our $Scratch_dir;
our $Stage_dir; our $Public_dir; our $Archive_dir;
foreach my $item ([tag => $zone_tag], [logtag => $Log_Tag],
[pkgconfdir => $package_config_base],
[pkgstatedir => $package_state_base],
- [serials => $serials_path
- ? (File::Spec->splitpath($serials_path))[2] : undef],
+ [serials => $serials_name],
[inboxdir => $Inbox_dir], [scratchdir => $Scratch_dir],
[stagedir => $Stage_dir], [publicdir => $Public_dir],
[archivedir => $Archive_dir])
our $package_config_base;
our $email_blacklist;
our $maintainers_bypkg;
-our $serials_path;
# syslog destination
use constant SYSLOG_APP_IDENT => 'gatekeeper';
my $full_filename = shift;
my $new_epoch = shift;
+ # scaffolding
+ our $package_state_base; our $serials_name;
+ return unless defined $serials_name;
+ my $serials_path = File::Spec->catfile($package_state_base, $serials_name);
+
# Now we need to flock the our 'serials' file;
# verify the epoch value there/update it, etc.
my %serials = ();