←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

Packman - A package management tool

Lyqyd's Photo Lyqyd 27 Jul 2015

I put a bit of work into packman this weekend. No major changes to report, but there are some behind-the-scenes improvements, specifically in the filesystem transaction system and in the processing of packman commands. I've also added some functionality that will eventually enable installing packages to other locations than root (for example, installing software onto pocket computers in disk drives), but that feature needs additional work still.
Quote

MineRobber___T's Photo MineRobber___T 05 Aug 2015

Thanks! This will make installation and upkeep of my OS a lot easier. I have a small question, however. How do you determine the size (for the package)? Going to write a few more programs, then attempt to add my repo to the repolist.
Quote

Lyqyd's Photo Lyqyd 06 Aug 2015

The size attribute isn't fully in use yet, so any non-zero value would be accepted. I usually determine the size by selecting all of the files that would be in the package and using Windows Explorer's "Properties" dialog to see the aggregate size of the group of files.
Quote

Lyqyd's Photo Lyqyd 27 Aug 2015

I've updated packman to also install new dependencies when updating packages. I'm not sure how I missed this before, but this omission has been corrected!
Quote

X3ME's Photo X3ME 28 Feb 2016

packman:322: attempt to call nil

322 contains this:
passback = {coroutine.resume(co, unpack(event))}
Quote

Lyqyd's Photo Lyqyd 28 Feb 2016

Re-download packman, the issue should be fixed.
Quote

MineRobber___T's Photo MineRobber___T 27 Oct 2016

MrObsidy's repository isn't working. Is there any way to make packman stop showing the error (other than removing the repository from /etc/repositories, if that even works)?

It says error on line 5 which is:

    category = os

Edited by MineRobber___T, 27 October 2016 - 10:14 PM.
Quote

Lyqyd's Photo Lyqyd 28 Oct 2016

I submitted a pull request a while back that fixes the issue with his repository. If there's no activity on his part soon, I may have to pull the repo, which I am rather reluctant to do.
Quote

apemanzilla's Photo apemanzilla 28 Oct 2016

Why not make it show a warning message and skip broken repositories so that a single malformed repository doesn't make it unusable?
Quote

Lyqyd's Photo Lyqyd 28 Oct 2016

The current behavior should be to display a warning (yellow text on advanced computers), then skip the rest of that package definition. It should then continue on to attempt to interpret the next package definition in the repository. It shouldn't be giving up on the whole repository (unless the sole package definition is malformed, as in this case), or crashing the whole program. Is it actually crashing, or just displaying a warning and continuing on?
Quote

apemanzilla's Photo apemanzilla 29 Oct 2016

View PostLyqyd, on 28 October 2016 - 04:21 AM, said:

The current behavior should be to display a warning (yellow text on advanced computers), then skip the rest of that package definition. It should then continue on to attempt to interpret the next package definition in the repository. It shouldn't be giving up on the whole repository (unless the sole package definition is malformed, as in this case), or crashing the whole program. Is it actually crashing, or just displaying a warning and continuing on?

My bad, it's working as intended.
Quote

Lyqyd's Photo Lyqyd 01 Nov 2016

MrObsidy accepted my pull request today, so the warning that appeared when parsing his repository should go away after running `packman fetch`.
Quote

apemanzilla's Photo apemanzilla 01 Nov 2016

View PostLyqyd, on 01 November 2016 - 05:34 PM, said:

...should go away after running `packman fetch`.

Bit too used to markdown? :P
Edited by apemanzilla, 01 November 2016 - 06:02 PM.
Quote

Lyqyd's Photo Lyqyd 01 Nov 2016

Don't remember the full font string the BBCode uses when you select the monospaced font, so it's a little tricky to use that from the quick reply box while on mobile. :P
Quote

apemanzilla's Photo apemanzilla 02 Nov 2016

View PostLyqyd, on 01 November 2016 - 07:32 PM, said:

Don't remember the full font string the BBCode uses when you select the monospaced font, so it's a little tricky to use that from the quick reply box while on mobile. :P

Ah, fair enough. It's Courier New for future reference.
Quote

aaronmallen's Photo aaronmallen 03 Nov 2016

Have you considered moving the repo list to a datastore of some sort? This could allow developers to add packages without having to continually update the repo for package includes. I'd be interested in putting in a PR if this is something you'd be interested in.
Quote

Lyqyd's Photo Lyqyd 03 Nov 2016

What are you envisioning?
Quote

aaronmallen's Photo aaronmallen 03 Nov 2016

View PostLyqyd, on 03 November 2016 - 03:10 AM, said:

What are you envisioning?

Ideally a developer would be able to create his/her package and then `packman publish <packfile>` which would push the package into the packman datastore (there are a lot of cheap/free datastores we could look into, or even build our own via heroku or amazon). This opens us up to a few new possibilities:

1. we can now offer versions of each package, so I could `packman fetch lyqyd/LyqydOS v0.2.5` even though the current version of LyqydOS is say v1.0.0 we would simply need to lock down the repo or pastebin at that state.

2. we can have a background process to actually grab all the files for the package and run something like luamin on the package files reducing the footprint of packages installed by packman (this of course means packman would actually install from our datastore and not the developers repository).

3. The entry barrier is lower... not that it's high now... you have to make a PR to the packman repo "big deal"... however, if I am a low level developer and am interested in pushing packages for people to share all I need is a unique name for my package and a CC computer to run `packman push` and my package is now distributed.

The only weird caveat here is I could see a developer doing all of his/her development out of game in like sublime or whatever (like I do), that developer would then need to copy his or her packfile (at the very least) onto a CC machine that has packman installed and run the push from there. That's the only somewhat crappy thing about this proposal. Unless of course you want to also distrubute some other tool that does this via npm or ruby gems, but that's a whole new game of overhead on this project.
Quote

Lyqyd's Photo Lyqyd 03 Nov 2016

Your suggestion has a few flaws that I can see:

- Credentials to push files to the data store would need to be baked in to packman, allowing anyone to easily recover them and use them maliciously.
- Development of packages without ComputerCraft installed is much more difficult.
- Storage of packages is centralized and must be managed by the owner of the data store.
- Exhaustive lists of past versions would need to be maintained and curated by someone, probably the owner of the data store.

I don't see very many advantages over the current system, honestly. I am quite happy with the current distributed system, as it allows package creators full control over their packages, with minimal centralized maintenance required.
Quote

H4X0RZ's Photo H4X0RZ 03 Nov 2016

Also, if you want some way to browse a repo and make it more "modular" you could look into my repo template. It allows you to save every project in it's own file and once you are ready to push to github, just run a little ruby script and it will generate the packfile and also create some html files for you which let you easily check out the content of the repo.

Here's my repo for reference. (and here's the UI)

@Lyqyd
BTW, why is Packman using a custom format for the packlist etc. instead of using something more... supported, like serialized tables or JSON?
Edited by H4X0RZ, 03 November 2016 - 10:44 PM.
Quote