Version: 1.1.0
Branch: fix/multi-component-inrelease
Status: Partially implemented
Aptly does NOT have a built-in command to "add a component" to an existing publication.
The available commands are:
aptly publish snapshot- Creates a NEW publication (overwrites existing)aptly publish switch- Updates ONE component's packages (if component already exists)aptly publish drop- Removes entire publication
There is NO aptly publish add command.
✅ Detection of existing publications by reading InRelease file
✅ Detection of existing components
✅ Logic to use publish switch when updating existing components
✅ Force-overwrite flag to handle existing pool files
✅ Database recovery from published repository
❌ Actual adding of new components to existing publications
To publish multiple components together, you need:
- Snapshots for ALL components (not just the new one)
- Single publish command with all snapshots:
aptly publish snapshot \ -distribution=noble \ -component=comp1,comp2,comp3 \ snapshot1 snapshot2 snapshot3 \ stable
When you call feelpp-apt-publish sequentially:
- First call: Creates publication with component1
- Second call: Overwrites publication with component2 only
- Third call: Overwrites publication with component3 only
Result: Only the LAST component remains in InRelease.
This bypasses the APT repository entirely:
cd /nvme0/prudhomm/Devel/feelpp.quickfix/third-party/mmg
docker build -f Dockerfile.mmg.local -t feelpp/mmg:local .✅ This works perfectly!
Create a script that:
- Clones gh-pages
- Creates snapshots for ALL components
- Publishes them together
Example:
# Create snapshots
aptly snapshot create mmg-snap from repo mmg-repo
aptly snapshot create parmmg-snap from repo parmmg-repo
aptly snapshot create ktirio-snap from repo ktirio-repo
# Drop existing publication
aptly publish drop noble stable
# Publish all together
aptly publish snapshot \
-distribution=noble \
-component=mmg,parmmg,ktirio-urban-building \
-skip-signing \
mmg-snap parmmg-snap ktirio-snap \
stableDownload all packages and publish them in a SINGLE aptly session:
# This would require extending feelpp-apt-publish to accept multiple components
feelpp-apt-publish \
--components mmg,parmmg,ktirio-urban-building \
--debs-mmg /path/to/mmg/packages \
--debs-parmmg /path/to/parmmg/packages \
--debs-ktirio /path/to/ktirio/packages \
--channel stable \
--distro nobleNote: This requires implementing multi-component support in the tool.
Refactor feelpp-aptly-publisher to support true multi-component publishing:
# Publish multiple components at once
feelpp-apt-publish \
--multi-component mmg=/path/to/mmg,parmmg=/path/to/parmmg \
--channel stable \
--distro noble
# Or with a config file
feelpp-apt-publish \
--components-file components.yaml \
--channel stable \
--distro noble- Accept multiple components: Extend CLI to accept component:path pairs
- Create multiple snapshots: One for each component
- Single publish command: Use
aptly publish snapshotwith all components - Handle updates: When some components exist and some are new
- Preserve existing: Download and republish components not being updated
- Design: 2 hours
- Implementation: 8 hours
- Testing: 4 hours
- Documentation: 2 hours
- Total: ~2 days
For MMG/ParMmg Docker images: Use Dockerfile.mmg.local ✅
For APT repository: Manual fix using direct aptly commands or wait for proper multi-component support in v2.0.0
-
src/feelpp_aptly_publisher/publisher.py:- Added InRelease file reading
- Added existing component detection
- Added force-overwrite flag
- Added database recovery
- Added logic to use switch vs snapshot
-
pyproject.toml: Version 1.0.0 → 1.1.0 -
src/feelpp_aptly_publisher/cli.py: Version string updated
✅ Docker image builds from local packages
✅ Tool detects existing publications
✅ Tool detects existing components
✅ Tool uses switch for existing components
❌ Adding new components (aptly limitation)
- Short term: Document workarounds clearly
- Medium term: Create manual republish script using direct aptly commands
- Long term: Implement proper multi-component support in v2.0.0
- Aptly issue: https://github.com/aptly-dev/aptly/issues/...
- APT multi-component specification: https://wiki.debian.org/DebianRepository/Format
The current implementation (v1.1.0) provides:
- ✅ Better detection of existing publications
- ✅ Smarter decision making (switch vs snapshot)
- ✅ Force-overwrite to handle conflicts
- ❌ Cannot truly add components due to aptly limitations
Recommendation: Use Docker with local packages until v2.0.0 implements proper multi-component support.