lyqyd / cc-packman Goto Github PK
View Code? Open in Web Editor NEWA package manager for ComputerCraft.
License: MIT License
A package manager for ComputerCraft.
License: MIT License
When I have the pre-namespaces version of packman, fetch downloads the new one then fails. This is because it tries to read the new files but it is still using the old version. Packman needs to be restarted after updating the installer.
Groups to install multiple packages at once
example:
name = basic-utils
type = group
packages =
wget
cat
category = utilities
target = /usr/bin
version = 0.1
size = 1103
end
Currently packman will not execute the setup script on update... I can see how executing this would be problematic, but perhaps we can include an update property for packages to run on update.
Create and maintain a local database of which packages the user has installed, and which versions. Perhaps include file location information so that packages may be removed automatically without the need for an uninstall script (while still allowing uninstall scripts).
I'm getting an error that makes packman completely unusable
installing packman from pastebin results in this error halfway down the repository fetch messages, and then every time i try to run packman after that. It also never installs easy-shell because of this. all my computers that had packman installed before still work, however.
I suspect this is because of the recent addition of #38 being done incorrectly
IMO if were are going to use bin
instead of programs
(bin being a unix standard, programs being how computercraft rom is laid out) then we should be utilizing lib
instead of apis
.
I'm working on a GUI for packman called Mynaptic. I get the Info of the package with packman search. It is possible, to show,if a package can be updated 8e.g. with a U) in packman search so I can esay ask for it?
Since CraftOS 1.8 startup can be a folder. So it would be nice to place easy-shell in this folder and not as file, if packman run on CraftOS 1.8. I have modified the code of esay-shell to do that:
local args = {...}
local exStr = [[shell.run("/usr/bin/easy-shell execute")]]
local function loadStartup(path)
local lines = {}
if fs.exists(path) then
local handle = io.open(path, "r")
if handle then
for line in handle:lines() do
table.insert(lines, line)
end
handle:close()
end
end
return lines
end
local function writeStartup(contents,path)
local handle = io.open(path, "w")
if handle then
for i, line in ipairs(contents) do
handle:write(line.."\n")
end
handle:close()
end
end
if #args >= 1 then
if args[1] == "execute" then
shell.setPath(shell.path()..":/usr/bin")
local loadAPI = os.loadAPI
os.loadAPI = function(path)
if fs.exists(path) then
return loadAPI(path)
elseif fs.exists(fs.combine("/usr/apis", path)) then
return loadAPI(fs.combine("/usr/apis", path))
end
end
elseif args[1] == "install" then
local path
if tonumber(os.version():sub(9)) > 1.7 then
path = "/startup/easyshell.lua"
else
path = "/startup"
end
local contents = loadStartup(path)
local changed = false
if fs.exists(path) then
local exists = false
for i = 1, #contents do
if contents[i] == exStr then
exists = true
break
end
end
if not exists then
table.insert(contents, 1, exStr)
changed = true
end
else
contents[1] = exStr
changed = true
end
if changed then
writeStartup(contents,path)
end
shell.run("usr/bin/easy-shell execute")
elseif args[1] == "remove" then
local contents = loadStartup()
for i = #contents, 1, -1 do
if contents[i] == exStr then
table.remove(contents, i)
end
end
writeStartup(contents)
end
end
If it runs on CraftOS 1.7 and earlier, it write the file /startup. On CraftOS 1.8 it write the file /startup/easyshell.lua, so the User can put other Programs in the startup folder.
Could not resolve dependency on main/setup in package demosthenex-turbine
packman:83: invalid key to 'next'
It appears when I try to install, update or remove anything. Fetching works fine.
Could you add support for some kind of virtual packages, I mean packages without any files, so they just load their dependencies, for example you have a program suite, you add all programs as own packages and then create a virtual package loading them all?
Since the package table has been implemented in later versions of CC, packman assumes that its own package library was loaded because the package global exists (see loadPackageAPI function in packman script).
A simple solution would just be to rename it however I'm not sure if programs from other projects rely on the package API from packman.
Direwolf20 just released his new pack... it looks like there's no CC but he does have open computers... It looks like it shares a lot of the same functionality as CC but there are some small differences (i.e. internet.request() vs http.get())
The scope of this feature request is to create either a seperate port of packman for Open Computers or refactor packman in a way that it can handle both.
This is probably (almost certainly) on my behalf. When I try to install glucose, I get an error.
This does not happen to any other repositories, yet I don't see what I am doing wrong. Am I missing the "size" field?
One feature that I think would be nice would be built-in support for help files. Maybe add a folder /usr/help
which is added with help.setPath
, and then packages can specify links to help files that will be downloaded there.
Then, users can simply use the help
command to get help on packages installed with packman.
I cant get it to work as i think the pastebin for admicos/ghv is down.
Add https://bitbucket.org/ compability
Make it idiotproof, for cases like packman fetch fetch fetch fetch
Besides the official repos I think alot of people would like to use the really nice utility to manage their own scripts so they can be easily installed on other computers.
packman repo add <url>
The url can point to an actual repository, a list of repos or a pastebin code with repos
packman repo remove <name / url>
Does the opposite, removes a repo from the local list of repos
Add ability to search through repos by name/category.
It seems #73 removes admicos from the repolist, but another repo in the default list depends on it... It seems to be blocking me from installing any other packages.
Restructure update sequence to perform file removal at the end of the rest of the transactions. Only queue file removal transactions for files which were removed from multi-file packages (file present in installed list, but no contents in new package state).
How to replicate:
libcfg
to libCFG
(mind the capitalization) (don't forget aconf which has a dependency on libCFG)packman install
packman:265: invalid key to 'next'
I want to give my programs a manpage. And theres no thing in packman to do that (you have not accepted my pull request) so I have the idea to run wget as setup and delete as cleanup.But I can only run Programs, who are in the target of the package. Is there any way to run Programs outside of the target .I know. that I can make a second package or write a script, but thats my favourite possibility.
Change repolist to have a version field, use versions to determine which packages to update when updating.
With my current understanding of the way packman addFile
works if two packages have a file of the same name (i.e. install
) the latest package installed will override the other. Perhaps namespacing packages would address this issue. Ideally all of my packages would be installed in /usr/bin/aaronmallen/<package file>
but easy-shell
would still be able to expose the individual programs to the root. Not sure if this issue should be here or on the easy-shell repo...
I think it could be used to host the commonly used APIs that don't have a package for the programs that depend on them, or for the people that don't want to have a repo for them and just want to put a package or two.
What do you guys think about it?
It would be nice, if the help folder from the latset update is in help.path(), so the Users can use the help programm to read the helpfile.
Remove old tonumber() version comparison and replace it with an iterative tonumber() comparison to check each period-separated component of the version string. Non-numeric characters in version strings will continue to be unsupported.
I can see a scenario where developers may want files in their repository that do not need to be downloaded to the CC computer. As an example I like to minimize my lua files using npm and luamin, I'll typically develop in the src
directory but really only need the dist
directory downloaded to the cc machine. This could be implemented in a couple of ways
.gitignore
maybe this could be implemented with a .packignore
file.I sort of like the second proposal there, but I'll leave that decision to you.
Would it be possible to add restrictions for packages to packman? For example, add a field named "restrict" where a developer can specify an api or basic statement that must evaluate to true to allow the package to be installed. For example, having "restrict = turtle" would mean the package could only be installed to turtles.
Polish and push to dan200.
I am currently using a very hacky program i made to do this, but it would be pretty useful if it was integrated to packman itself, as currently downloading multiple files are only limited to repositories
Packman will get a file which has the following format:
https://example.com/file1 /file1
https://example.com/file2 /file2
https://example.com/file3 /file3
And it'll save the files (possibly relative to the target folder) in the place after the seperating space.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.